<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Jing support for other schema languages</title>
</head>
<body>
<h1>Jing support other schema languages</h1>

<p>In addition to RELAX NG (both XML and compact syntax), Jing has
support for some other schema languages. This support is less mature
than the RELAX NG support.  These schema languages all use XML and
Jing can autodetect using the namespace URI of the document element.
However, if you use the <code>-c</code> option, no autodetection will
be performed and the schema will be parsed as RELAX NG compact
syntax.</p>

<p>Jing has support for the following schema languages:</p>

<dl>

<dt><a href="http://www.ascc.net/xml/resource/schematron/schematron.html">Schematron</a></dt>

<dd><a name="schematron"></a>Jing's implementation is not based on the
reference Schematron implementation. It is implemented partly in XSLT
and partly in Java.  This implementation requires that the Schematron
elements be properly namespaced using the namespace URI
<code>http://www.ascc.net/xml/schematron</code>.  Jing can report
correct line numbers both for errors in the instance and errors in the
schema (including XPath errors). It can use either Saxon or Xalan as
its XSLT engine.  Jing is distributed with Saxon, because JDK 1.4
includes an old version of Xalan, which does not work properly for
this application, and it is tricky to prevent the JRE using this
version.  A command-line option of <code>-d</code> enables
diagnostics.  A command-line option of
<code>-p&#160;<var>phase</var></code> specifies the phase to use. Both
reports and failed assertions are considered errors.  The Schematron
schema is subject to rather more rigorous checking (using a RELAX NG
schema) than the reference Schematron implementation.</dd>

<dt><a href="http://www.w3.org/TR/xmlschema-1/">W3C
XML Schema</a></dt>

<dd><a name="xsd"></a>Jing provides support for W3C XML Schema using a
wrapper around <a
href="http://xml.apache.org/xerces2-j/">Xerces-J</a>. Any
<code>xsi:schemaLocation</code> and
<code>xsi:noNamespaceSchemaLocation</code> hints in the instance are
ignored.</dd>

<dt><a href="nrl.html">Namespace Routing Language (NRL)</a></dt>

<dd><a name="nrl"></a>The XML Namespaces Recommendation allows an XML
document to be composed of elements and attributes from multiple
independent namespaces. Each of these namespaces may have its own
schema; the schemas for different namespaces may be in different
schema languages.  NRL is an experimental language for specifying how
the schemas for the different namespaces are to be composed in order
to allow validation of the complete document.  The implementation in
Jing fully supports the language described in the
specification. Subschemas can be in any of the languages supported by
Jing (including, recursively, NRL).  Jing does not yet support the
<code>schema</code> option for W3C XML Schema subschemas, which would
allow more than one schema URI to be specified.</dd>

<dt><a href="mns.html">Modular Namespaces (MNS)</a></dt>

<dd><a name="mns"></a>MNS is the predecessor to NRL, and should be
considered obsolescent.  MNS support will disappear in a future
release.</dd>

</dl>

<address><a href="mailto:jjc@jclark.com">James Clark</a></address>

</body>
</html>
